package com.ybkj.daijia.server.service;


import com.ybkj.daijia.common.Result;
import com.ybkj.daijia.page.Page;
import com.ybkj.daijia.server.sales.Activity;
import com.ybkj.daijia.server.sales.ActivityRecord;
import com.ybkj.daijia.server.sales.ActivityVo;
import java.text.ParseException;
import java.util.Map;


/**
 * @author Shine
 */
public interface ActivityService {

    /**
     * @param driverid
     * @param end
     * @param start
     * @param name
     * @return name为null则查询出所有的信息，否则只查询出与name匹配的信息
     */
    public Page<Activity> queryActivities(String event, String type);

    public Result<Activity> update(Activity activity);

    public Result<Activity> stop(Long activityId);

    /**
     * @param id
     * @return
     */
    public Activity findOne(Long id);

    public Result<Activity> delete(Long activityId);

    public Page<Map<String, Object>> queryByCompany(Long companyId, Integer page, Integer limit);

    public Result<Activity> create(Activity activity);

    public Result<ActivityVo> phoneGift(Long activityId, String phone);

    public Page<ActivityRecord> queryActivityRecord(Long activityId, String phone, Long companyId,
        String startTime, String endTime, Integer page, Integer rows) throws ParseException;

    public Long countActivityRecord(Long activityId, String phone, Long companyId, String startTime,
        String endTime) throws ParseException;

    public ActivityRecord findOneRecord(Long id);

    public Boolean findFreeFirstOrder(Long passengerId, String type, String orderFromSource);


}
